﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace CadlineRegistration
{
    public static class Formathelper
    {
        public static bool isNumeric(string str)
        {
            if (str != null)
                return Regex.IsMatch(str, "^[0-9]*$");
            else
                return true;
        }

        public static bool isValidMail(string str)
        {
            if (str != null)
                return Regex.IsMatch(str, @"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$");
            else
                return true;
        }
    }
}
